[CI] Add new Agent for disabling or quarantining tests#12570
Merged
davidfowl merged 2 commits intodotnet:mainfrom Oct 31, 2025
Merged
[CI] Add new Agent for disabling or quarantining tests#12570davidfowl merged 2 commits intodotnet:mainfrom
davidfowl merged 2 commits intodotnet:mainfrom
Conversation
Member
radical
commented
Oct 31, 2025
- Add support for ActiveIssue to QuarantineTools
- Add new test-disabler agent
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12570Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12570" |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for marking tests with [ActiveIssue] in addition to [QuarantinedTest] in the QuarantineTools utility. This allows the tool to handle both Aspire-specific test quarantining and standard xUnit test disabling workflows.
- Adds a new
--modeoption to switch betweenquarantine(default, uses QuarantinedTest) andactiveissue(uses ActiveIssue) modes - Updates the tool to handle both attribute types with appropriate namespace imports (
Aspire.TestUtilitiesfor QuarantinedTest,Xunitfor ActiveIssue) - Adds comprehensive test coverage for ActiveIssue functionality
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tools/QuarantineTools/README.md | Updated documentation to describe the new --mode option and ActiveIssue functionality with usage examples |
| tools/QuarantineTools/Quarantine.cs | Added mode selection logic, constants for both attribute types, and refactored to support either attribute dynamically |
| tests/QuarantineTools.Tests/ActiveIssueTests.cs | New comprehensive test suite covering ActiveIssue attribute addition/removal scenarios |
| .github/agents/test-disabler.md | New agent instruction document for automated test disabling/quarantining via GitHub Copilot |
Comments suppressed due to low confidence (3)
tools/QuarantineTools/Quarantine.cs:636
- The XML documentation comment is outdated. It should be updated to reflect that this method can now remove either [QuarantinedTest] or [ActiveIssue] attributes depending on configuration, not just [QuarantinedTest].
/// <summary>
/// Removes the [QuarantinedTest] attribute from a method, if present. Returns the (potentially)
/// modified method and flags via <paramref name="removed"/> whether a change occurred.
/// </summary>
tools/QuarantineTools/Quarantine.cs:18
- The overview comment at the top of the file should be updated to mention that the tool now supports both [QuarantinedTest] and [ActiveIssue] attributes, not just [QuarantinedTest].
// This small command-line tool helps developers quarantine or unquarantine failing/flaky xUnit tests
// across the repository's tests folder by adding or removing the [QuarantinedTest] attribute on
// test methods. It edits source files directly using Roslyn (Microsoft.CodeAnalysis) to ensure safe and
// structured modifications.
tools/QuarantineTools/Quarantine.cs:1
- The workflow description in the file header comment should be updated to describe that the tool can now add either [QuarantinedTest] or [ActiveIssue] based on the mode, and add the corresponding using directive (Aspire.TestUtilities or Xunit).
// Licensed to the .NET Foundation under one or more agreements.
davidfowl
approved these changes
Oct 31, 2025
Member
davidfowl
left a comment
There was a problem hiding this comment.
I want something to investigate tests next ! 😄
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.